package org.wak.inventory
{
	import flash.display.DisplayObject;

	public class XMLInventoryItemDefinition implements IInventoryItemDefinition
	{
		// identification String of the item
		private var mItemId:String = "" ;
		
		// Id of the item display.
		private var mItemDisplayId:String = "" ; 
		
		// Id of the mouse icon display.
		private var mMouseIconDisplayId:String = "" ; 
		
		private var mMouseIconX:Number = 0 ;
		private var mMouseIconY:Number = 0 ;
		
		// Item name
		private var mItemName:String = "" ;
		
		private var mUnitaryUse:Boolean = false ;
		
		private var mDescription:String = "" ;
		
		public function XMLInventoryItemDefinition(pXMLInput:XML)
		{
			mItemId = pXMLInput.@id ;
			mItemDisplayId = pXMLInput.Display ;
			mMouseIconDisplayId = pXMLInput.MouseIcon ;
			mMouseIconX = pXMLInput.MouseIcon.@x ;
			mMouseIconY = pXMLInput.MouseIcon.@y ;
			mItemName = pXMLInput.Name ;
			mUnitaryUse = pXMLInput.@unitaryUse == "true" ? true : false;
			mDescription = pXMLInput.Description ;
		}

		public function get itemId():String
		{
			return mItemId;
		}
		
		public function get itemName():String
		{
			return mItemName;
		}
		
		public function get itemDisplayId():String
		{
			return mItemDisplayId;
		}
		
		public function get mouseIconDisplayId():String
		{
			return mMouseIconDisplayId;
		}
		
		public function get unitaryUse():Boolean
		{
			return mUnitaryUse ;
		}
		
		public function get description():String
		{
			return mDescription ;
		}
		
		public function get mouseIconX():Number 
		{
			return mMouseIconX ;
		}
		
		public function get mouseIconY():Number 
		{
			return mMouseIconY ;
		}
		
		
	}
}